package com.platform.framework.serviceimpl.wxpay;


import org.springframework.stereotype.Service;

import java.util.Date;

import org.springframework.beans.factory.annotation.Autowired;

import com.platform.framework.dao.wxpay.WxpayReturnInfoMybatisDao;
import com.platform.framework.entity.wxpay.WxpayReturnInfo;
import com.platform.framework.serviceinf.wxpay.WxpayReturnInfoService;

@Service("wxpayReturnInfoService")
public class WxpayReturnInfoServiceImpl implements WxpayReturnInfoService{

	@Autowired
	private WxpayReturnInfoMybatisDao wxpayReturnInfoMybatisDao;

	@Override
	public void saveOrUpdate(WxpayReturnInfo wxpayReturnInfo) {
		// TODO Auto-generated method stub
		if (wxpayReturnInfo != null && wxpayReturnInfo.getId() == null) {
			wxpayReturnInfo.setCreateDate(new Date());
			wxpayReturnInfoMybatisDao.save(wxpayReturnInfo);
		} else if (wxpayReturnInfo != null && wxpayReturnInfo.getId() != null) {
			wxpayReturnInfo.setUpdateDate(new Date());
			wxpayReturnInfoMybatisDao.update(wxpayReturnInfo);
		}
	}

}

